Error C2653: 'UBlueprintFunctions': is not a class or namespace name

Hi, I’m working on in-game localization.

I was following this tutorial but his error appears.

tutorial : A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums

error : error C2653: ‘UBlueprintFunctions’: is not a class or namespace name

Am I missing some library or something ?

Thanks !

Have you created the C++ class as the entry says? If so, are you including that class’s header file where you need to access it?

yes I have, the code looks like:

Ahh okay, so the error there is just because you changed the name of the class. In your cpp file (and wherever else you’ll reference the function in your C++ code) you should be using Upreklad_class instead of UBlueprintFunctions.

Yes namespace is wrong in cpp file, it needs to be the same as class you declared function. The way it is now, you attempting to define changeLocatization inside UBlueprintFunctions class, which not even exist, let alone declare such function.

Also i don’t usually point that out and not like serious issue, but you butchered class name so much that i think you need to read about code style used in UE4:

UE4 code and code building tools expect you to use that naming shame, this will help you avoid any naming issues in editor and well save a time by typing DisplayName all the time as UHT will automatically generate it from function name.

cool, it works ! Thank you guys. But it looks like it only work in standalone, but not in packaged game. Is there a way to fix it ?

ok looks like I’ve found it. At that moment, I just had to turn the internationalization enum (in project setts) from English to all.