Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1016121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:30:09+00:00 2026-05-16T10:30:09+00:00

I’ve got an iPhone app that need to be localized. No problem with strings,

  • 0

I’ve got an iPhone app that need to be localized.
No problem with strings, but, I’m having trouble with resources : I need to load HTML pages that are localized.
The files are like : presentation.htm
The files are added in the project with the folder where they are (html/), and it add the group called as the folder.

I load the html pages with this code :

NSString *pathPresentation = [[NSBundle mainBundle] pathForResource:@"presentation" ofType:@"htm"];

if(!pathPresentation) {
    NSLog(@"Could not find presentation.htm");
}
NSURL *url = [NSURL fileURLWithPath:pathPresentation];
NSLog(@"-> path presentation.htm : %@", pathPresentation);
UIWebView *webViewPresentation = [[UIWebView alloc] init];
NSData *htmlData = [NSData dataWithContentsOfFile:pathPresentation];  
if (htmlData) {  
    [webViewPresentation loadData:htmlData MIMEType:@"text/html" textEncodingName:@"Latin-1" baseURL:url];  
}

First Try :

I’ve followed the indications of this website I Can Localize, since there was yet localized resources in the app.
The folders are named : en.lproj and fr.lproj.

I try it on the simulator, but it didn’t succeed :

  • the log indicates that the path is : (…)/myapp.app/presentation.htm
  • the file loaded in the simulator is in french, while the simulator is in english.

Second Try :

Then, I delete the resources and re-add them in their group folder (Resource/html/). I pressed the Info button, and choose to “Make file localizable”.
The file was added in a English.lproj folder.
Then I choose “Add Localization”, and “French”.

I try it on the simulator, but it didn’t succeed (I have clean the build before testing) :

  • the log indicates that the path is : (…)/myapp.app/presentation.htm
  • the file loaded in the simulator is in french, while the simulator is in english.

Third Try :

After reading this page about loading localized resources on iPhone OS 4.0, I’ve changed the resources in localized folders (delete resources, and rename folders in en_UK.lproj and fr_FR.lproj

I try it on the simulator, but it didn’t succeed (I have clean the build before testing) :

  • the log indicates that the path is : (…)/myapp.app/presentation.htm
  • the file loaded in the simulator is in french, while the simulator is in english.

Help ?

Any idea ?
I know there is the function :
- (NSString *)pathForResource:(NSString *)name ofType:(NSString *)extension inDirectory:(NSString *)subpath forLocalization:(NSString *)localizationName

But I want it to be as automatic as possible, and fixing things like Directory or localizationName may prevent my app to be automatic.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T10:30:09+00:00Added an answer on May 16, 2026 at 10:30 am

    The solution is :

    1. remove application from simulator (or device)
    2. use simple localized folders, as : en.lproj
    3. clean build
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I need a function that will clean a strings' special characters. I do NOT
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I need to clean up various Word 'smart' characters in user input, including but
i got an object with contents of html markup in it, for example: string
I have thousands of HTML files to process using Groovy/Java and I need to
I'm having trouble keeping the paragraph square between the quote marks. In firefox the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.